home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 109 / 109.d81 / tower test (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  10KB  |  468 lines

  1. 10 poke56,56:poke51,0:clr:poke53272,31
  2. 11 poke53280,0:poke53281,0:w$=""
  3. 12 ad=49152:dv=peek(186):ifdv<8thendv=8
  4. 13 n=20:dimq$(n,14),a$(n),ck(n),ck$(n)
  5. 14 gosub7000
  6. 19 gosub1000:gosub1100:gosub1300
  7. 20 fori=1ton:ck$(i)=" ":next
  8. 21 fori=1ton:ck(i)=0:next
  9. 23 sysad+18,10,7,20,4,1,1
  10. 24 sysad+33
  11. 25 poke214,7:print:printtab(12)"[212]he [212]ower [212]est
  12. 26 [153][163]12)"(NULL)ee atnnswers "
  13. 27 [153][163]12)"right$nstructions"
  14. 28 [153][163]12)"(NULL)(NULL)atnstr$(NULL)(NULL)atn(NULL)    "
  15. 30 [158]ad[170]12,11,8,30,4,1,3
  16. 35 k[178][194](828)
  17. 36 h$[178]"tower instr":[139]k[178]2[167]h$[178]"tower answr"
  18. 37 [145]k[141]100,8000,8000,9000
  19. 40 [137]20
  20. 45 :
  21. 100 sc[178]0:x[178]1
  22. 105 [158]ad[170]3,1:[141]1000
  23. 106 [141]1200:[141]1400
  24. 108 [158]ad[170]15,2,4,38,19,160,15
  25. 109 [151]214,3:[153]
  26. 110 [158]ad[170]33:[129]i[178]1[164]14:[153]"list"q$(x,i):[130]
  27. 115 [151]214,18:[153]:[153]"listatn(NULL)(NULL)(NULL)val(NULL): ";
  28. 120 [161]w$:[139]w$[178]""[167]120
  29. 125 [143]print"list"w$
  30. 130 [139]w$[178]"m" [167][158]ad[170]6,1:[142]:[143] menu
  31. 140 [139]w$[178]"p"[167][158]ad[170]27,1,4,38,20,7:[143] print
  32. 150 [139]w$[178]"on"[167]x[178]x[171]1:[139]x[179]1[167]x[178]1
  33. 155 [139]w$[178]""[167]173
  34. 160 [139]w$[178]"on" [176]w$[178]""[167]106
  35. 161 [139]w$[179]"a"[176]w$[177]"d"[167]115
  36. 170 [139]w$[179][177]a$(x)[167]175
  37. 171 ck$(x)[178]"sqr":[139]ck(x)[178]0[167]sc[178]sc[170]10:ck(x)[178]1:[141]1200
  38. 172 [141]3000
  39. 173 x[178]x[170]1:[139]x[177]n [167] [141]2000:[142]
  40. 174 [137]106
  41. 175 ck(x)[178]2:[141]4000
  42. 180 [137]109
  43. 1000 [153]"loadortantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan^";
  44. 1005 [153]"(NULL)cont                                      wait(NULL)";
  45. 1010 [153]"-tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan<";
  46. 1015 [129]i[178]1[164]18:[153]"(NULL)list                                      wait(NULL)";:[130]
  47. 1020 [153]"-tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan<";
  48. 1025 [153]"(NULL)print                                      wait(NULL)";
  49. 1030 [153]"/tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantanexp";:[158]ad[170]33
  50. 1035 [142]
  51. 1040 :
  52. 1100 [151]214,0:[153]:[153][163]10)"cont(NULL) (NULL) (NULL) val (NULL)   (NULL) val (NULL) (NULL)":[142]
  53. 1200 [151]214,0:[153]:[153]"cont(NULL)(NULL)(NULL)val(NULL) (NULL)val(NULL)(NULL)   (NULL)(NULL)val(NULL)(NULL)right$(NULL)(NULL):"[170][201](" "[170][196](x),2);
  54. 1205 [153]ck$(x)[170]"  (NULL)len(NULL)(NULL)val:"[170][201]("   "[170][196](sc),3)
  55. 1210 [142]
  56. 1300 [151]214,21:[153]:[153]"print    (NULL)se len(NULL)(NULL)(NULL) keys/(NULL)val(NULL)(NULL)(NULL)(NULL) to (NULL)elect":[142]
  57. 1400 [151]214,21:[153]:[153]"print  (NULL)-(NULL)enu  \-(NULL)ext  ^-(NULL)revious  (NULL)-(NULL)rint"
  58. 1405 [142]
  59. 2000 [158]ad[170]3,0
  60. 2005 [158]ad[170]18,4,7,30,7,4,1
  61. 2010 [158]ad[170]21,"(NULL)val(NULL)(NULL) (NULL)(NULL)val(NULL)!",8,4,1
  62. 2011 [158]ad[170]24,"(NULL)len(NULL)(NULL)val:"[170][196](sc),15,10,4,1
  63. 2012 rk$[178]"(NULL)(NULL)atn(NULL)close(NULL)valatn(NULL)"
  64. 2013 [139]sc[177]40[167]rk$[178] "val(NULL)val(NULL)atn(NULL)(NULL)(NULL) (NULL)(NULL)val(NULL)atn(NULL)(NULL)(NULL)"
  65. 2014 [139]sc[177]80[167]rk$[178] "(NULL)atn(NULL)(NULL)atn (NULL)atn(NULL)(NULL)(NULL)val(NULL)"
  66. 2015 [139]sc[177]120[167]rk$[178]"(asc(NULL)(NULL)) asc(NULL)right$val(NULL)str$ (NULL)asc (NULL)(NULL)valval(NULL)"
  67. 2016 [139]sc[177]160[167]rk$[178]"(asc(NULL)asc) asc(NULL)right$val(NULL)str$ (NULL)asc ascval(NULL)str$val(NULL)"
  68. 2020 [158]ad[170]24,"(NULL)atn(NULL)(NULL): "[170]rk$,6,12,4,1
  69. 2021 [158]ad[170]21,"(NULL)ress (NULL)val(NULL)(NULL)(NULL)(NULL)",14,4,1
  70. 2022 [141]51300
  71. 2023 [161]k$:[139]k$[179][177][199](13)[167]2023
  72. 2024 [158]ad[170]6,1:[142]
  73. 2025 :
  74. 3000 [158]ad[170]3,0
  75. 3005 [158]ad[170]18,10,10,20,3,4,1
  76. 3010 [158]ad[170]21,"  (NULL)right$chr$left$(NULL)!",12,4,1
  77. 3015 [141]50760
  78. 3020 [158]ad[170]6,0:[142]
  79. 3025 :
  80. 4000 [158]ad[170]3,0
  81. 4005 [158]ad[170]18,10,10,20,3,10,1
  82. 4010 [158]ad[170]21,"  (NULL)(NULL)(NULL)(NULL)chr$!",12,10,1
  83. 4015 [141]52420
  84. 4020 [158]ad[170]6,0:[142]
  85. 4025 :
  86. 7000 [129]i[178]1[164]n
  87. 7005 [129]j[178]1[164]14
  88. 7010 [135] q$(i,j)
  89. 7015 [130]
  90. 7020 [135]a$(i):[130]
  91. 7025 [142]
  92. 7030 :
  93. 8000 [158]49152[170]3,1:[153]"load"[163]13)"def(NULL)left$val (NULL)(NULL)(NULL)val(NULL) (NULL)val(NULL)(NULL)"
  94. 8005 [158]49152[170]18,0,1,38,21,1,0
  95. 8015 [158]49152[170]33
  96. 8020 [158]49152[170]21,"(NULL)ress (NULL)val(NULL)(NULL)(NULL)(NULL)     _ to valxit",24,13,0
  97. 8025 [159]2,dv,2,h$[170]",p,r":[158]49152[170]30,14
  98. 8030 [151]198,0
  99. 8035 [158]49152[170]21,"       (NULL)ress (NULL)val(NULL)(NULL)(NULL)(NULL)       ",24,10,0
  100. 8040 [161]k$:[139]k$[179][177][199](13)[167]8040
  101. 8045 [151] 198,0
  102. 8050 [160]2:[158]49152[170]6,1:[142]
  103. 8055 :
  104. 9000 [158]ad[170]3,1
  105. 9005 [151]214,21:[153]:[153]"print     (NULL)uit? atnre you sure? (y/n)    "
  106. 9010 [161]k$:[139]k$[178]""[167]9010
  107. 9015 [139]k$[179][177]"y"[167][158]ad[170]6,1:[142]
  108. 9020 [137]40000
  109. 10000 [159]15,8,15,"s0:tower test":[160]15:[148]"0:tower test",8:[128]
  110. 11001 [131] "1] ascour people go to a baseball"
  111. 11002 [131] "game. (NULL)hey purchase tickets for four"
  112. 11003 [131] "seats in a row.  lenhris agrees to sit"
  113. 11004 [131] "beside (NULL)om, but not next to peekill."
  114. 11005 [131] "right$f peekill refuses to sit beside mid$oe,"
  115. 11006 [131] "in what order (left to right) are"
  116. 11007 [131] "the four sitting?"
  117. 11008 [131] " "
  118. 11009 [131] "atn: lenhris, mid$oe, (NULL)om, peekill"
  119. 11010 [131] "peek: peekill, lenhris, mid$oe, (NULL)om"
  120. 11011 [131] "len: (NULL)om, mid$oe, lenhris, peekill"
  121. 11012 [131] "str$: mid$oe, lenhris, (NULL)om, peekill"
  122. 11013 [131] " "
  123. 11014 [131] " "
  124. 11015 [131] "d"
  125. 11016 :
  126. 12001 [131] "2] right$f a dog has a value of 1, and a"
  127. 12002 [131] "bulldog has a value of 2, what is"
  128. 12003 [131] "the value of a collie?"
  129. 12004 [131] " "
  130. 12005 [131] "atn: 2"
  131. 12006 [131] "peek: 3"
  132. 12007 [131] "len: 4"
  133. 12008 [131] "str$: 1"
  134. 12009 [131] " "
  135. 12010 [131] " "
  136. 12011 [131] " "
  137. 12012 [131] " "
  138. 12013 [131] " "
  139. 12014 [131] " "
  140. 12015 [131] "b"
  141. 12016 :
  142. 13001 [131] "3] (NULL)hat is the next character in the"
  143. 13002 [131] "   following series?"
  144. 13003 [131] " "
  145. 13004 [131] "   * [ * ( * $ * ] * ?"
  146. 13005 [131] " "
  147. 13006 [131] " "
  148. 13007 [131] "atn: $"
  149. 13008 [131] "peek: ("
  150. 13009 [131] "len: *"
  151. 13010 [131] "str$: )"
  152. 13011 [131] " "
  153. 13012 [131] " "
  154. 13013 [131] " "
  155. 13014 [131] " "
  156. 13015 [131] "d"
  157. 13016 :
  158. 14001 [131] "4] atn man decided to go shopping in a"
  159. 14002 [131] "store where there are no price tags,"
  160. 14003 [131] "but the store owner has a 'formula'"
  161. 14004 [131] "for calculating the price of each "
  162. 14005 [131] "item. right$f a hat costs $6, a shirt $10,"
  163. 14006 [131] "and a tie $6, how much would a belt"
  164. 14007 [131] "cost?"
  165. 14008 [131] " "
  166. 14009 [131] " "
  167. 14010 [131] "atn: $6"
  168. 14011 [131] "peek: $8"
  169. 14012 [131] "len: $10"
  170. 14013 [131] "str$: $12"
  171. 14014 [131] " "
  172. 14015 [131] "b"
  173. 14016 :
  174. 15001 [131] "5] (NULL)hat is the missing number in the"
  175. 15002 [131] "   following sequence?"
  176. 15003 [131] " "
  177. 15004 [131] "   2,5,11,?,47,95"
  178. 15005 [131] " "
  179. 15006 [131] " "
  180. 15007 [131] " "
  181. 15008 [131] " "
  182. 15009 [131] " "
  183. 15010 [131] "atn: 23"
  184. 15011 [131] "peek: 31"
  185. 15012 [131] "len: 19"
  186. 15013 [131] "str$: 25"
  187. 15014 [131] " "
  188. 15015 [131] "a"
  189. 15016 :
  190. 16001 [131] "6] atn is to val as peek is to ?"
  191. 16002 [131] " "
  192. 16003 [131] " "
  193. 16004 [131] " "
  194. 16005 [131] " "
  195. 16006 [131] " "
  196. 16007 [131] " "
  197. 16008 [131] " "
  198. 16009 [131] " "
  199. 16010 [131] "atn: chr$"
  200. 16011 [131] "peek: len"
  201. 16012 [131] "len: str$"
  202. 16013 [131] "str$: (NULL)"
  203. 16014 [131] " "
  204. 16015 [131] "b"
  205. 16016 :
  206. 17001 [131] "7] right$f vald has 4 black socks and 8"
  207. 17002 [131] "white socks in his drawer, how many"
  208. 17003 [131] "socks does he need to pull out to"
  209. 17004 [131] "ensure that he has a pair of white"
  210. 17005 [131] "socks (assuming that vald is in the"
  211. 17006 [131] "dark)?"
  212. 17007 [131] " "
  213. 17008 [131] " "
  214. 17009 [131] " "
  215. 17010 [131] "atn: 2"
  216. 17011 [131] "peek: 4"
  217. 17012 [131] "len: 6"
  218. 17013 [131] "str$: 8"
  219. 17014 [131] " "
  220. 17015 [131] "c"
  221. 17016 :
  222. 18001 [131] "8] (NULL)hich numbers most reasonably"
  223. 18002 [131] "   come ne